Random = Mock.Random

function getChangePwdRes(){
    let json = {
        code : 200,
        msg : '修改密码成功'
    }

    return json
}

function getChangeInfoRes(){
    let json = {
        code : 200,
        msg : '修改成功'
    }

    return json
}

function uploadRes(){
    let json = Mock.mock({
        code : 200,
        data : Random.image(),
        msg: '上传成功'
    })

    return json
}

function change_avatar(){
    let json = {
        code : 200,
        msg : '上传成功'
    }

    return json
}

Mock.mock('http://localhost/change_pwd.php', 'post', getChangePwdRes)

Mock.mock('http://localhost/change_info.php', 'post', getChangeInfoRes)

Mock.mock('http://localhost/upload.php', 'post', uploadRes)

Mock.mock('http://localhost/change_avatar.php', 'post', change_avatar)